﻿using System;
using System.Web.UI;
using AjaxControlToolkit;
using System.ComponentModel;

[assembly: WebResource("jQueryNET.Common.DataControlBase.js", "application/x-javascript")]

namespace jQueryNET
{
	[ClientScriptResource("jQueryNET.Controls.DataControlBase", "jQueryNET.Common.DataControlBase.js")]
	public class DataControlBase : ControlBase
	{
		#region Public constructors

		/// <summary>
		/// Initializes a new ScriptControl
		/// </summary>
		/// <param name="tag"></param>
		public DataControlBase(HtmlTextWriterTag tag)
			: base(tag)
		{
			
		}
		/// <summary>
		/// Initializes a new ScriptControl
		/// </summary>
		protected DataControlBase()
		{
			
		}
		/// <summary>
		/// Initializes a new ScriptControl
		/// </summary>
		/// <param name="tag"></param>
		protected DataControlBase(string tag)
			: base(tag)
		{
			
		}
		/// <summary>
		/// Initializes a new ScriptControl
		/// </summary>
		/// <param name="enableClientState"></param>
		protected DataControlBase(bool enableClientState)
			: base(enableClientState)
		{
			
		}
		/// <summary>
		/// Initializes a new ScriptControl
		/// </summary>
		/// <param name="enableClientState"></param>
		/// <param name="tag"></param>
		protected DataControlBase(bool enableClientState, HtmlTextWriterTag tag)
			: base(enableClientState, tag)
		{
			
		}
		/// <summary>
		/// Initializes a new ScriptControl
		/// </summary>
		/// <param name="enableClientState"></param>
		/// <param name="tag"></param>
		protected DataControlBase(bool enableClientState, string tag)
			: base(enableClientState, tag)
		{

		}

		#endregion

		#region Public properties

		[Description("Data source")]
		[Category("Behavior")]
		[ExtenderControlProperty]
		[ClientPropertyName("dataSourceId")]
		public string DataSourceId {
			get { return (string)(ViewState["DataSourceId"] ?? String.Empty); }
			set { ViewState["DataSourceId"] = value;}
		}
		#endregion
	}
}
